﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Runnergame.Model
{
    class Level
    {
        public int[,] levelArray;

        public Level()
        {
            levelArray = new int[10,13]
        {
            {0,0,0,0,0,0,0,0,0,0,0,0,0},
            {0,0,0,0,0,0,0,0,0,0,0,0,0},
            {0,0,0,0,0,0,0,0,0,0,0,0,0},
            {0,0,0,0,0,0,0,0,0,0,0,0,0},
            {0,0,0,0,0,0,0,0,0,0,0,0,0},
            {0,0,0,0,0,0,0,0,0,0,0,0,0},
            {0,0,0,0,0,0,0,0,0,0,0,0,0},
            {0,0,0,0,0,0,0,0,0,0,0,0,0},
            {1,1,1,1,1,1,1,1,1,1,1,1,1},
            {1,1,1,1,1,1,1,1,1,1,1,1,1},
        };
        }

        internal Tile LoadTile(int tileType, int x, int y) 
        {

            switch (tileType)
            {
                case 0:
                    return new Tile(TileCollision.Passable, x,y);

                case 1:
                    return new Tile(TileCollision.Impassable, x,y);

                default:
                    throw new NotSupportedException(String.Format("Fel tiletyp '{0}' på position {1}, {2}.", tileType, x, y));

            }
        
        }
    }
}
